const DLsiteScraper = require('../src/services/dlsiteScraper');

async function main() {
  const scraper = new DLsiteScraper();
  try {
    const productInfo = await scraper.scrapeProduct('RJ01080930');
    console.log('商品信息:', productInfo);
  } catch (error) {
    console.error('爬取过程中出错:', error);
  }
}

main();


/*
RJ01035736
商品信息: {
  code: 'RJ397336',
  title: '【碧蓝航线ASMR】治愈指挥官小分队!・敦刻尔克的甜蜜午后',
  circle: { id: 64308, name: 'アトリエメール' },
  releaseDate: '2022-06-17',
  series: { id: 32802, name: '治愈指挥官小分队!' },
  va: [ '原田彩楓' ],
  ageCategory: '全年龄',
  workType: '音声・ASMR',
  tags: [
    { id: 51, name: '萌え' },
    { id: 56, name: '癒し' },
    { id: 496, name: 'バイノーラル/ダミヘ' },
    { id: 497, name: 'ASMR' },
    { id: 8, name: '日常/生活' },
    { id: 503, name: 'ささやき' }
  ],
  price: 1650,
  sales: {
    total_sale: 14176,
    favorites: '634',
    sale_detail: '[{"workno":"RJ395908","edition_id":5032,"edition_type":"language","display_order":1,"label":"日本語","lang":"JPN","dl_count":"11685","display_label":"日本語"},{"workno":"RJ397336","edition_id":5032,"edition_type":"language","display_order":2,"label":"簡体中文","lang":"CHI_HANS","dl_count":"1321","display_label":"簡体中文"},{"workno":"RJ397337","edition_id":5032,"edition_type":"language","display_order":3,"label":"繁体中文","lang":"CHI_HANT","dl_count":"415","display_label":"繁体中文"},{"workno":"RJ397341","edition_id":5032,"edition_type":"language","display_order":4,"label":"英語","lang":"ENG","dl_count":"755","display_label":"英語"}]'
  },
  rating: {
    average_rating: 4.94,
    rating_count: 123,
    score_detail: '[{"review_point":1,"count":0,"ratio":0},{"review_point":2,"count":0,"ratio":0},{"review_point":3,"count":1,"ratio":0},{"review_point":4,"count":5,"ratio":4},{"review_point":5,"count":117,"ratio":95}]'
  }
}

 */